package com.qihetimes.earthangel.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 物品表
 * </p>
 *
 * @author f4cklangzi@gmail.com
 * @since 2022-01-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("goods")
@ApiModel(value="Goods对象", description="物品表")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId("id")
    private String id;

    @ApiModelProperty(value = "发布人ID")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "受赠人ID")
    @TableField("to_user_id")
    private String toUserId;

    @ApiModelProperty(value = "物品名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "原始价格")
    @TableField("original_price")
    private BigDecimal originalPrice;

    @ApiModelProperty(value = "新旧程度")
    @TableField("age")
    private String age;

    @ApiModelProperty(value = "视频URL")
    @TableField("video_url")
    private String videoUrl;

    @ApiModelProperty(value = "录音URL")
    @TableField("record_url")
    private String recordUrl;

    @ApiModelProperty(value = "详细介绍")
    @TableField("description")
    private String description;

    @ApiModelProperty(value = "城市")
    @TableField("city")
    private String city;

    @ApiModelProperty(value = "区")
    @TableField("region")
    private String region;

    @ApiModelProperty(value = "物品关键词")
    @TableField("keyword")
    private String keyword;

    @ApiModelProperty(value = "物品类别")
    @TableField("category")
    private String category;

    @ApiModelProperty(value = "纬度，范围为 -90~90，负数表示南纬")
    @TableField("latitude")
    private Double latitude;

    @ApiModelProperty(value = "经度，范围为 -180~180，负数表示西经")
    @TableField("longitude")
    private Double longitude;

    @ApiModelProperty(value = "位置geohash")
    @TableField("geohash")
    private String geohash;

    @ApiModelProperty(value = "物品数量")
    @TableField("count")
    private Integer count;

    @ApiModelProperty(value = "物品状态")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "上传时间")
    @TableField("created_at")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间")
    @TableField("updated_at")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "点赞喜欢数")
    @TableField("like_count")
    private Integer likeCount;

    @ApiModelProperty(value = "评论数")
    @TableField("comment_count")
    private Integer commentCount;

    @ApiModelProperty(value = "收藏数")
    @TableField("favorite_count")
    private Integer favoriteCount;


}
